A virtual machine (VM) is a portion of software that, when executed on appropriate hardware, creates an environment allowing the virtualization of an actual physical computer system (e.g., a server, a mainframe computer, etc.). The actual physical computer system is typically referred to as a “host machine,” and the operating system (OS) of the host machine is typically referred to as the “host operating system.” Typically, software on the host machine known as a “hypervisor” (or a “virtual machine monitor”) manages the execution of one or more virtual machines or “guests”, providing a variety of functions such as virtualizing and allocating resources, context switching among virtual machines, etc. The operating system (OS) of the virtual machine is typically referred to as the “guest operating system.”
One resource managed by the host machine is a networking device. In order to manage the host's network devices, the hypervisor may assign them to virtual machines for exclusive use. Alternatively, it can provide virtual hardware to the virtual machines and use host machine resources to provide connectivity to the virtual hardware. For example, the hypervisor could provide a virtual network device and attach it to a physical network interface. It would then forward any network packets destined to the virtual machine to a receive queue of the virtual network device, and forward any network packets transmitted by the virtual machine via the physical network interface. The networking device, which can be a physical device assigned to the virtual machine, or a virtual device, can have multiple queues for managing incoming packets to be received by a virtual machine and outgoing packets transmitted by a virtual machine. When the networking device has completed a unit of work, it can deliver a signal to the requesting virtual machine to indicate that packets are ready for delivery, typically known as an “interrupt.” Interrupt coalescing is a technique in which the delivery of the interrupts is deferred until a predetermined number of interrupts are queued, or an interval timer has triggered.